/*********************************
 * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
 * Copyright (c) 2012 NVision Group, Inc. All rights reserved.
 *
 * AbstractModel.java 05.10.2012 1:32:42
 *********************************/
package ru.kruzhki.shared.model;

import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.googlecode.objectify.annotation.Id;

/**
 * @author serg
 *
 */
public abstract class AbstractModel implements IsSerializable {
	@Id private Long id;

	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Override
	public final String toString() {
	    return toStringHelper().toString();
	}
	protected ToStringHelper toStringHelper() {
        return Objects.toStringHelper(this)
                .add("id", getId());
    }
	
}
